package com.app.android.coliy.ui.view;

import android.content.Context;
import android.os.Handler;

import com.app.android.coliy.bean.ElementsInfo;

import java.util.Calendar;
import java.util.Date;

public class ElementView_XuLieHao extends ElementView_Text {

    public ElementView_XuLieHao(Context context, ElementsInfo info) {
        super(context, info);
        init();
    }

    Handler handler = new Handler();
    Calendar calendar;

    private void init() {
        calendar = Calendar.getInstance();
//        handler.post(runnable);
    }

    Runnable runnable = new Runnable() {
        @Override
        public void run() {
            elementsInfo.text = new Date().toLocaleString();
//            calendar.add(Calendar.SECOND, 1);
            refreshUI();
            handler.postDelayed(runnable, 1000);
        }
    };

}
